home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / QuickDraw 3D / Samples / SampleCode / BoxPaint+ - non stereo / headers / BoxPaint_texture.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-14  |  2.0 KB  |  90 lines  |  [TEXT/CWIE]

  1. /******************************************************************************
  2.  **                                                                             **
  3.  **     Module:        BoxPaint_texture.h                                         **
  4.  **                                                                          **
  5.  **                                                                          **
  6.  **     Purpose:     Code for a editable texture.                             **
  7.  **                                                                          **
  8.  **                                                                          **
  9.  **                                                                          **
  10.  **     Copyright (C) 1996-1997 Apple Computer, Inc.  All rights reserved.     **
  11.  **                                                                          **
  12.  **                                                                          **
  13.  *****************************************************************************/
  14. #ifndef _BP_TEXTURE_H_
  15. #define _BP_TEXTURE_H_
  16.  
  17. #if PRAGMA_ONCE
  18.     #pragma once
  19. #endif
  20.  
  21. #include    <QuickDraw.h>
  22.  
  23. #include "QD3D.h"
  24. #include "QD3DGroup.h"
  25. #include "QD3DStorage.h"
  26.  
  27. /******************************************************************************
  28.  **                                                                             **
  29.  **                                 Structures                                     **
  30.  **                                                                             **
  31.  *****************************************************************************/
  32.  
  33. typedef    struct _texture    Texture, *TexturePtr, **TextureHdl;
  34.  
  35.  
  36. /******************************************************************************
  37.  **                                                                             **
  38.  **                                 Routines                                     **
  39.  **                                                                             **
  40.  *****************************************************************************/
  41.  
  42. TextureHdl    Texture_New(
  43.     void);
  44.     
  45. void        Texture_Dispose(
  46.     TextureHdl        theTexture);
  47.  
  48. TQ3Status    Texture_SetResolution(
  49.     TextureHdl        theTexture,
  50.     long            newResolution);
  51.     
  52. long        Texture_GetResolution(
  53.     TextureHdl        theTexture);
  54.  
  55.  
  56. /*    
  57. **    Use to use a pict as an editable texture
  58. */    
  59.     
  60. TQ3Status    Texture_SetPict(
  61.     TextureHdl        theTexture,
  62.     PicHandle        hPict);
  63.  
  64. /*    
  65. **    Use to apply a texture to a group
  66. */    
  67.     
  68. TQ3Status    Texture_SetToGroup(
  69.     TextureHdl        theTexture,
  70.     TQ3GroupObject    theGroup) ;
  71.  
  72. /*    
  73. **    Refresh the texture after making changes
  74. */    
  75.     
  76. TQ3Status    Texture_Update(
  77.     TexturePtr         theTexture);
  78.  
  79. /*    
  80. **    Paint a black line using UV coordinates
  81. */    
  82.     
  83. void        Texture_PaintLineUV(
  84.     TexturePtr         theTexture,
  85.     TQ3Param2D         from,
  86.     TQ3Param2D         to);
  87.  
  88.  
  89. #endif
  90.